package org.example.java8.methodquato;

import java.util.List;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;

public class Test {

	public static void main(String[] args) {
//		final Worker worker = Worker.born(Worker::new);
//		final List<Worker> list = Arrays.asList(worker);
//		System.out.println(list.get(0));
//		
//		list.forEach(Worker::roadWorker);
//		
//		list.forEach(Worker::carWorker);
//		
//		
//		list.forEach(worker::codeWorker);
		
		test();
	}

	
	static void test() {
		List<String> list = new ArrayList();     
		list.add("Tom");
		list.add("Jack");
		list.add("Lucy");    
//		list.forEach(System.out::println);
//		list.forEach(e -> System.out.println(e));
		
		PrintStream ps = System.out;
		list.forEach(ps::println);
	}
}
